
import java.io.Serializable;
import java.util.ArrayList;


public class ObjectGroup extends GlobalObject implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -6951728182622631059L;
	ArrayList<GlobalObject> children;
	
	
	public ObjectGroup() {
		
		this.children = new ArrayList<GlobalObject>();
		System.out.println("Created a new group!");
	}

	//@Override
	void moveLeft(Integer delta) {
		
		for (GlobalObject child : this.children) {
			child.moveLeft(delta);
		}
		
		

	}

	//@Override
	void moveRight(Integer delta) {
		for (GlobalObject child : this.children) {
			child.moveRight(delta);
		}
		
		

	}
	
	public void addElement(GlobalObject element) {
		this.children.add(element);
		
		System.out.println("Added object to group!");
		
		
	}

}
